x86/stack: refactor show_trace()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Nov 2013 12:36:47 +0000 (13:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Nov 2013 12:36:47 +0000 (13:36 +0100)
commit9f000b981e54027b1579225a54ee991d337f8d5b
tree5b24ea1f7f59128f5243ee184b48bfac482dd27b
parentb18e2d96e785e7088f3b137e800f987bbe8c7657
x86/stack: refactor show_trace()

Before, show_trace() had two implementations depending on
CONFIG_FRAME_POINTER.  Some parts were common, while the loops to wander up
the stack were different.

The version aided by frame pointers had a special case for function calls on
wild function pointers, but this doesn't need to be a special case.

After the refactoring, there are now two implementations of _show_trace()
which differ depending on CONFIG_FRAME_POINTER, and a single show_trace()
with the common bits, including the logic for wild function pointers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c